package com.danco.training.zaneuskaya.service.comparator;

import java.io.Serializable;
import java.util.Comparator;

import com.danco.training.zaneuskaya.domain.Book;

public class BookComparatorByAlphabet implements Comparator<Book>, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 820077866477624707L;

	public int compare(Book o1, Book o2) {
		String title1 = o1.getTitle();
		String title2 = o2.getTitle();

		return title1.compareTo(title2);
	}

}
